<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SolrResponse class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="solrclient.threads.html">« SolrClient::threads</a></li>
      <li style="float: right;"><a href="solrresponse.getdigestedresponse.html">SolrResponse::getDigestedResponse »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.solr.html">Solr</a></li>
    <li>The SolrResponse class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.solrresponse" class="reference">

 <h1 class="title">The SolrResponse class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL solr &gt;= 0.9.2)</p>


  <div class="section" id="solrresponse.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    Represents a response from the Solr server.
   </p>
  </div>


  <div class="section" id="solrresponse.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">abstract</span>
      <span class="modifier">class</span> <strong class="classname">SolrResponse</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.solrresponse.html#solrresponse.constants.parse-solr-obj"><var class="varname">PARSE_SOLR_OBJ</var></a></var><span class="initializer"> = 0</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.solrresponse.html#solrresponse.constants.parse-solr-doc"><var class="varname">PARSE_SOLR_DOC</var></a></var><span class="initializer"> = 1</span>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-status">$<var class="varname">http_status</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.parser-mode">$<var class="varname">parser_mode</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.success">$<var class="varname">success</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-status-message">$<var class="varname">http_status_message</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-request-url">$<var class="varname">http_request_url</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-raw-request-headers">$<var class="varname">http_raw_request_headers</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-raw-request">$<var class="varname">http_raw_request</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-raw-response-headers">$<var class="varname">http_raw_response_headers</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-raw-response">$<var class="varname">http_raw_response</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">protected</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.solrresponse.html#solrresponse.props.http-digested-response">$<var class="varname">http_digested_response</var></a></var>;</div>


    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getdigestedresponse.html" class="methodname">getDigestedResponse</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.gethttpstatus.html" class="methodname">getHttpStatus</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.gethttpstatusmessage.html" class="methodname">getHttpStatusMessage</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getrawrequest.html" class="methodname">getRawRequest</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getrawrequestheaders.html" class="methodname">getRawRequestHeaders</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getrawresponse.html" class="methodname">getRawResponse</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getrawresponseheaders.html" class="methodname">getRawResponseHeaders</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getrequesturl.html" class="methodname">getRequestUrl</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.getresponse.html" class="methodname">getResponse</a></span>(): <span class="type"><a href="class.solrobject.html" class="type SolrObject">SolrObject</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.setparsemode.html" class="methodname">setParseMode</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$parser_mode</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrresponse.success.html" class="methodname">success</a></span>(): <span class="type">bool</span></div>

   }</div>


  </div>

  

  <div class="section" id="solrresponse.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="solrresponse.props.http-status"><var class="varname">http_status</var></dt>

     <dd>

      <p class="para">The http status of the response.</p>
     </dd>

    
    
     <dt id="solrresponse.props.parser-mode"><var class="varname">parser_mode</var></dt>

     <dd>

      <p class="para">Whether to parse the solr documents as SolrObject or SolrDocument instances.</p>
     </dd>

    
    
     <dt id="solrresponse.props.success"><var class="varname">success</var></dt>

     <dd>

      <p class="para">Was there an error during the request</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-status-message"><var class="varname">http_status_message</var></dt>

     <dd>

      <p class="para">Detailed message on http status</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-request-url"><var class="varname">http_request_url</var></dt>

     <dd>

      <p class="para">The request URL</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-raw-request-headers"><var class="varname">http_raw_request_headers</var></dt>

     <dd>

      <p class="para">A string of raw headers sent during the request.</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-raw-request"><var class="varname">http_raw_request</var></dt>

     <dd>

      <p class="para">The raw request sent to the server</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-raw-response-headers"><var class="varname">http_raw_response_headers</var></dt>

     <dd>

      <p class="para">Response headers from the Solr server.</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-raw-response"><var class="varname">http_raw_response</var></dt>

     <dd>

      <p class="para">The response message from the server.</p>
     </dd>

    
    
     <dt id="solrresponse.props.http-digested-response"><var class="varname">http_digested_response</var></dt>

     <dd>

      <p class="para">The response in PHP serialized format.</p>
     </dd>

    
   </dl>

  </div>


  

  <div class="section" id="solrresponse.constants">
   <h2 class="title">预定义常量</h2>
   <div class="section" id="solrresponse.constants.types">
    <h2 class="title">SolrResponse Class Constants</h2>
    <dl>

     
      <dt id="solrresponse.constants.parse-solr-obj"><strong><code>SolrResponse::PARSE_SOLR_OBJ</code></strong></dt>

      <dd>

       <p class="para">Documents should be parsed as SolrObject instances</p>
      </dd>

     

     
      <dt id="solrresponse.constants.parse-solr-doc"><strong><code>SolrResponse::PARSE_SOLR_DOC</code></strong></dt>

      <dd>

       <p class="para">Documents should be parsed as SolrDocument instances.</p>
      </dd>

     

    </dl>

   </div>
  </div>



 </div>

 














































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="solrresponse.getdigestedresponse.html">SolrResponse::getDigestedResponse</a> — Returns the XML response as serialized PHP data</li><li><a href="solrresponse.gethttpstatus.html">SolrResponse::getHttpStatus</a> — Returns the HTTP status of the response</li><li><a href="solrresponse.gethttpstatusmessage.html">SolrResponse::getHttpStatusMessage</a> — Returns more details on the HTTP status</li><li><a href="solrresponse.getrawrequest.html">SolrResponse::getRawRequest</a> — Returns the raw request sent to the Solr server</li><li><a href="solrresponse.getrawrequestheaders.html">SolrResponse::getRawRequestHeaders</a> — Returns the raw request headers sent to the Solr server</li><li><a href="solrresponse.getrawresponse.html">SolrResponse::getRawResponse</a> — Returns the raw response from the server</li><li><a href="solrresponse.getrawresponseheaders.html">SolrResponse::getRawResponseHeaders</a> — Returns the raw response headers from the server</li><li><a href="solrresponse.getrequesturl.html">SolrResponse::getRequestUrl</a> — Returns the full URL the request was sent to</li><li><a href="solrresponse.getresponse.html">SolrResponse::getResponse</a> — Returns a SolrObject representing the XML response from the server</li><li><a href="solrresponse.setparsemode.html">SolrResponse::setParseMode</a> — Sets the parse mode</li><li><a href="solrresponse.success.html">SolrResponse::success</a> — Was the request a success</li></ul>
</div>
</div></div></body></html>